package it.softphone.commons.service.security.shiro;

import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.web.mgt.CookieRememberMeManager;

public class MyCookieRememeberMeManager extends CookieRememberMeManager {

	@Override
	protected byte[] decrypt(byte[] encrypted) {
		try {
			return super.decrypt(encrypted);
		}
		catch(  org.apache.shiro.crypto.CryptoException ex ) {
			// TODO log  error
		}
		
		return null;
	}

	@Override
	protected PrincipalCollection deserialize(byte[] serializedIdentity) {
		
		if( serializedIdentity == null ) return null;
		
		try {
			return super.deserialize(serializedIdentity);
		}
		catch(  org.apache.shiro.io.SerializationException ex ) {
			// TODO log error
		}
		
		return null;
	}

}
